<%@ page contentType="text/html;charset=utf-8" language="java"
	pageEncoding="UTF-8" import="java.util.Date"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="vp" uri="/commonajaxpage"%>
<div class="table-scroll">
	<table id="datatable" class="table-min-2800">
	<tr>
		<th width="110">操作</th>
		<th  width="110">供应商编码</th>
		<th>供应商名称</th>
		<th>供应商简称</th>
		<th  width="110">启用状态</th>
		<th>联系人</th>
		<th>联系方式</th>
		<th>地址</th>
		<th>备注</th>
		<th  width="100">创建人</th>
		<th  width="150">创建时间</th>
		<th  width="100">修改人</th>
		<th  width="150">修改时间</th>
	</tr>
	<c:forEach items="${model.items}" var="item" varStatus="itemStatus">
		<tr id="row_${item.id}">
			<td><span class="rm-table-btn buttonrole"
				onclick="edit('${item.id}');" name="btnedit">编辑</span>
			 <c:choose>
                               
				<c:when test="${item.status == '1' }">
					 <span class="rm-table-btn buttonrole"  onclick="confirm('${item.id}',1);"  name="btnstatus"   >停用</span>
				</c:when>
				<c:when test="${item.status == '2' }">
					 <span class="rm-table-btn buttonrole"  onclick="confirm('${item.id}',2);"   name="btnstatus"  >启用</span>
				</c:when>
				<c:otherwise>
					
				</c:otherwise>
				</c:choose>   
				
				  <span
				class="rm-table-btn buttonrole" onclick="del('${item.id}');" name="btndel">删除</span></td>
			<td>${item.factoryCode}</td>
			<td>${item.factoryName}</td>
			<td>${item.factoryShortName}</td>
			<c:choose>
				<c:when test="${item.status == '1'}">
					<td  align="center" class="cdr fw7">启用 </td> 
			</c:when>
			<c:when test="${item.status == '2'}">
				<td  align="center" class="cdr fw7">停用</td> 
			</c:when>
			<c:otherwise>
				<td  align="center" class="cdr fw7"></td> 
			</c:otherwise>
			</c:choose>
			<td>${item.factoryContacts}</td>
			<td>${item.mobile}</td>
			<td>${item.address}</td>
			<td>${item.remark}</td>
			<td>${item.creatUserName}</td>
			<td><fmt:formatDate value="${item.createTime}" type="both"
					pattern="yyyy-MM-dd HH:mm:ss" /></td>
			<td>${item.updateUserName}</td>
			<td><fmt:formatDate value="${item.updateTime}" type="both"
					pattern="yyyy-MM-dd HH:mm:ss" /></td>

		</tr>
	</c:forEach>

</table>
</div>
<vp:pages cpage="${model.cpage}" totalCount="${model.totalCount}"
	pageSize="${model.pageSize}" />

